package com.cz.zslu.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * <p>
 * 订单商品管理
 * </p>
 *
 * @author 森森
 * @since 2018-10-25
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("zsl_order_commodty")
public class ZslOrderCommodty extends SuperEntity<ZslOrderCommodty> {

    private static final long serialVersionUID = 1L;

    /**
     * 状态0 有效 1无效
     */
    @JSONField(serialize = false)
    @TableLogic
    @JsonIgnore
    private Integer state = 0;
    /**
     * 归属用户id
     */
    @ApiModelProperty("归属用户id")
    @TableField("user_id")
    private Long userId;
    /**
     * 商品id
     */
    @ApiModelProperty("商品id")
    @TableField("commodity_id")
    private Long commodityId;
    /**
     * 订单id
     */
    @ApiModelProperty("订单id")
    @TableField("order_id")
    private Long orderId;
    /**
     * 商品名称
     */
    @ApiModelProperty("商品名称")
    @TableField("commodity_name")
    private String commodityName;
    /**
     * 原价
     */
    @ApiModelProperty("原价")
    @TableField("market_price")
    private BigDecimal marketPrice;
    /**
     * 零售价格
     */
    @ApiModelProperty("零售价格")
    @TableField("retail_price")
    private BigDecimal retailPrice;

    /**
     * 商品数量
     */
    @ApiModelProperty("商品数量")
    private Integer count;
    /**
     * 总价
     */
    @ApiModelProperty("总价")
    @TableField("total_price")
    private BigDecimal totalPrice;

    /**
     * 商品图片
     */
    @ApiModelProperty("商品图片")
    @TableField("pic_url")
    private String picUrl;


}
